<template>
  <maincontainer>
    <n-space>
      <n-button @click='getmenulist'>获取用户菜单列表</n-button>
    </n-space>
    <n-space>
      {{thisdata}}
    </n-space>
  </maincontainer>
</template>

<script setup name='Myceshi' lang='ts'>
import http from "@/request/request"
import { useRoute } from 'vue-router'
import { inject,ref } from 'vue'

const route = useRoute()
const thisdata = ref([])
// 获取菜单列表
const getmenulist=()=>{
  http.menubyuser({}).then((res:any)=>{
    if(res.data.code===0){
      thisdata.value =res.data.items
    }
  })
}


const zhucefunc: Function | undefined = inject('zhuceshuaxinfunc')
// 初始化函数
const init = () => {
}

// 初始化区域
init()
zhucefunc && zhucefunc({ 'Actionlog': init })
console.log(route, '路由都有什么')
</script>


<style scoped>
</style>
